Add private header for GtkTextView
authorEmmanuele Bassi <ebassi@gnome.org>
Sat, 15 Oct 2016 19:38:13 +0000 (20:38 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Mon, 17 Oct 2016 10:10:14 +0000 (11:10 +0100)
This allows us to declare the symbols that are currently used inside
gtktextdisplay.c without incurring in the wrath of the compiler.

gtk/Makefile.am
gtk/gtktextdisplay.c
gtk/gtktextview.c
gtk/gtktextviewprivate.h [new file with mode: 0644]

index 4b70e99dad5c3663c50aabf062874b857b94cfd4..71b0b7583f1aa78e0a40d56b466b19011572de63 100644 (file)
@@ -564,6 +564,7 @@ gtk_private_h_sources =             \
        gtktexttagprivate.h     \
        gtktexttypes.h          \
        gtktextutil.h           \
+       gtktextviewprivate.h    \
        gtktrashmonitor.h       \
        gtktogglebuttonprivate.h \
        gtktoolbarprivate.h     \
index 99e79cb496ffecbbd31217e9c267da4569f0017f..eaa42c19323b0ec80d205d872c5b36a926c68100 100644 (file)
@@ -77,6 +77,7 @@
 #include "config.h"
 #include "gtktextattributesprivate.h"
 #include "gtktextdisplay.h"
+#include "gtktextviewprivate.h"
 #include "gtkwidgetprivate.h"
 #include "gtkstylecontextprivate.h"
 #include "gtkintl.h"
@@ -166,9 +167,6 @@ get_item_appearance (PangoItem *item)
   return NULL;
 }
 
-extern GtkCssNode *gtk_text_view_get_text_node      (GtkTextView *text_view);
-extern GtkCssNode *gtk_text_view_get_selection_node (GtkTextView *text_view);
-
 static void
 gtk_text_renderer_prepare_run (PangoRenderer  *renderer,
                               PangoLayoutRun *run)
index 10fec27155bf7207bae7d0acd0b0f11af975c7fe..f266f0a8a6b2d0a63eec05f6514e1702d36075d3 100644 (file)
@@ -25,6 +25,8 @@
 
 #include "config.h"
 
+#include "gtktextviewprivate.h"
+
 #include <string.h>
 
 #define GTK_TEXT_USE_INTERNAL_UNSUPPORTED_API
@@ -43,7 +45,6 @@
 #include "gtkselectionprivate.h"
 #include "gtktextbufferrichtext.h"
 #include "gtktextdisplay.h"
-#include "gtktextview.h"
 #include "gtkimmulticontext.h"
 #include "gtkprivate.h"
 #include "gtktextutil.h"
diff --git a/gtk/gtktextviewprivate.h b/gtk/gtktextviewprivate.h
new file mode 100644 (file)
index 0000000..9eddfd8
--- /dev/null
@@ -0,0 +1,32 @@
+/* gtktextviewprivate.h: Private header for GtkTextView
+ *
+ * Copyright (c) 2016  Emmanuele Bassi
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __GTK_TEXT_VIEW_PRIVATE_H__
+#define __GTK_TEXT_VIEW_PRIVATE_H__
+
+#include "gtktextview.h"
+#include "gtkcssnodeprivate.h"
+
+G_BEGIN_DECLS
+
+GtkCssNode *    gtk_text_view_get_text_node             (GtkTextView *text_view);
+GtkCssNode *    gtk_text_view_get_selection_node        (GtkTextView *text_view);
+
+G_END_DECLS
+
+#endif /* __GTK_TEXT_VIEW_PRIVATE_H__ */